/*
 * Copyright (C) 2019-2020 Alibaba Group Holding Limited
 */

#ifndef __BOARD_CONFIG_H__
#define __BOARD_CONFIG_H__

#include <pin_name.h>

#ifdef __cplusplus
extern "C" {
#endif

/* console */
#define CONSOLE_TXD PA19
#define CONSOLE_RXD PA20
#define CONSOLE_TXD_FUNC PA19_UART1_TX
#define CONSOLE_RXD_FUNC PA20_UART1_RX
#define CONSOLE_IDX 1

/* wifi*/
#define WIFI_SDIO_CMD PA15
#define WIFI_SDIO_CMD_FUNC PA15_SDIO_CMD
#define WIFI_SDIO_CLK PA16
#define WIFI_SDIO_CLK_FUNC PA16_SDIO_CLK
#define WIFI_SDIO_DAT0 PA17
#define WIFI_SDIO_DAT0_FUNC PA17_SDIO_DAT0
#define WIFI_SDIO_DAT1 PA18
#define WIFI_SDIO_DAT1_FUNC PA18_SDIO_DAT1
#define WIFI_SDIO_DAT2 PA13
#define WIFI_SDIO_DAT2_FUNC PA13_SDIO_DAT2
#define WIFI_SDIO_DAT3 PA14
#define WIFI_SDIO_DAT3_FUNC PA14_SDIO_DAT3
#define WLAN_ENABLE_PIN PB3
#define WLAN_POWER_PIN 0xFFFFFFFF

/* BT */
#define BT_UART_IDX 0
#define BT_UART_TXD PA2
#define BT_UART_RXD PA0
#define BT_UART_TXD_FUNC PA2_UART0_TX
#define BT_UART_RXD_FUNC PA0_UART0_RX
#define BT_DIS_PIN PB4

/* button */
//#define APP_KEY_MUTE PA29
//#define APP_KEY_VOL_INC PB20
//#define APP_KEY_VOL_DEC PA24
//#define APP_KEY_STANDBY PA25

/* PA */
#define PIN_PA_MUTE PB31
#define AUDIO_REF_ADC_ID   2

/* LED */
//#define LED0_PIN PB21
//#define LED1_PIN PB31
//#define LED_FLIP_FLAG 1 /* 低电平亮 */

/* QSPI FLash */
#define EXAMPLE_QSPI_IDX 0

/* RTC */
#define CONFIG_RTC_EN 1
#define CONFIG_RTC_CLK (24540) /* internal RC CLK: 24.540KHz */

#ifdef __cplusplus
}
#endif

#endif /* __BOARD_CONFIG_H__ */
